package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.Business_infoExt;
@SuppressWarnings("unchecked")
/**
 * business_info
 */
public class Business_info {
	/**
	 * BID
	 */
	public String bID;
	/**
	 * BNAME
	 */
	public String bNAME;
	/**
	 * BLEVEL
	 */
	public String bLEVEL;
	/**
	 * BLEVELNAME
	 */
	public String bLEVELNAME;
	/**
	 * BADDRESS
	 */
	public String bADDRESS;
	/**
	 * BPHONE
	 */
	public String bPHONE;
	/**
	 * BlEADERNAME
	 */
	public String blEADERNAME;
	/**
	 * BlEADERPHONE
	 */
	public String blEADERPHONE;
	/**
	 * BRECOMMENDEDID
	 */
	public String bRECOMMENDEDID;
	/**
	 * JOINTIME
	 */
	public String jOINTIME;
	/**
	 * BRECOMMENDEDNAME
	 */
	public String bRECOMMENDEDNAME;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static Business_infoExt DB = new Business_infoExt(); 
	
	public Business_info() {
		super();
	}
	
	public Business_info(String bID, String bNAME, String bLEVEL, String bLEVELNAME, String bADDRESS, String bPHONE, String blEADERNAME, String blEADERPHONE, String bRECOMMENDEDID, String jOINTIME, String bRECOMMENDEDNAME) {
		super();
		this.bID = bID; 
		this.bNAME = bNAME; 
		this.bLEVEL = bLEVEL; 
		this.bLEVELNAME = bLEVELNAME; 
		this.bADDRESS = bADDRESS; 
		this.bPHONE = bPHONE; 
		this.blEADERNAME = blEADERNAME; 
		this.blEADERPHONE = blEADERPHONE; 
		this.bRECOMMENDEDID = bRECOMMENDEDID; 
		this.jOINTIME = jOINTIME; 
		this.bRECOMMENDEDNAME = bRECOMMENDEDNAME; 
	}
	
	public String getBID() {
		return bID;
	}

	public void setBID(String bID) {
		this.bID = bID;
	} 
	
	public String getBNAME() {
		return bNAME;
	}

	public void setBNAME(String bNAME) {
		this.bNAME = bNAME;
	} 
	
	public String getBLEVEL() {
		return bLEVEL;
	}

	public void setBLEVEL(String bLEVEL) {
		this.bLEVEL = bLEVEL;
	} 
	
	public String getBLEVELNAME() {
		return bLEVELNAME;
	}

	public void setBLEVELNAME(String bLEVELNAME) {
		this.bLEVELNAME = bLEVELNAME;
	} 
	
	public String getBADDRESS() {
		return bADDRESS;
	}

	public void setBADDRESS(String bADDRESS) {
		this.bADDRESS = bADDRESS;
	} 
	
	public String getBPHONE() {
		return bPHONE;
	}

	public void setBPHONE(String bPHONE) {
		this.bPHONE = bPHONE;
	} 
	
	public String getBlEADERNAME() {
		return blEADERNAME;
	}

	public void setBlEADERNAME(String blEADERNAME) {
		this.blEADERNAME = blEADERNAME;
	} 
	
	public String getBlEADERPHONE() {
		return blEADERPHONE;
	}

	public void setBlEADERPHONE(String blEADERPHONE) {
		this.blEADERPHONE = blEADERPHONE;
	} 
	
	public String getBRECOMMENDEDID() {
		return bRECOMMENDEDID;
	}

	public void setBRECOMMENDEDID(String bRECOMMENDEDID) {
		this.bRECOMMENDEDID = bRECOMMENDEDID;
	} 
	
	public String getJOINTIME() {
		return jOINTIME;
	}

	public void setJOINTIME(String jOINTIME) {
		this.jOINTIME = jOINTIME;
	} 
	
	public String getBRECOMMENDEDNAME() {
		return bRECOMMENDEDNAME;
	}

	public void setBRECOMMENDEDNAME(String bRECOMMENDEDNAME) {
		this.bRECOMMENDEDNAME = bRECOMMENDEDNAME;
	} 
	
	
	public Map business_infoToMap() {
		Map map = new HashMap();
		try {
			map.put("bID",this.bID);
			map.put("bNAME",this.bNAME);
			map.put("bLEVEL",this.bLEVEL);
			map.put("bLEVELNAME",this.bLEVELNAME);
			map.put("bADDRESS",this.bADDRESS);
			map.put("bPHONE",this.bPHONE);
			map.put("blEADERNAME",this.blEADERNAME);
			map.put("blEADERPHONE",this.blEADERPHONE);
			map.put("bRECOMMENDEDID",this.bRECOMMENDEDID);
			map.put("jOINTIME",this.jOINTIME);
			map.put("bRECOMMENDEDNAME",this.bRECOMMENDEDNAME);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Business_info mapToBusiness_info(Map map){
		try {
			String bID =  map.get("bID").toString();
			String bNAME =  map.get("bNAME").toString();
			String bLEVEL =  map.get("bLEVEL").toString();
			String bLEVELNAME =  map.get("bLEVELNAME").toString();
			String bADDRESS =  map.get("bADDRESS").toString();
			String bPHONE =  map.get("bPHONE").toString();
			String blEADERNAME =  map.get("blEADERNAME").toString();
			String blEADERPHONE =  map.get("blEADERPHONE").toString();
			String bRECOMMENDEDID =  map.get("bRECOMMENDEDID").toString();
			String jOINTIME =  map.get("jOINTIME").toString();
			String bRECOMMENDEDNAME =  map.get("bRECOMMENDEDNAME").toString();
			Business_info business_info = new Business_info(bID, bNAME, bLEVEL, bLEVELNAME, bADDRESS, bPHONE, blEADERNAME, blEADERPHONE, bRECOMMENDEDID, jOINTIME, bRECOMMENDEDNAME);
			return business_info;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return business_infoToMap().toString();
	}
	
	//方便数据操作	
	public Business_info insert(){
		return DB.insert(this);
	}
	public Business_info update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
